#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <iostream>
#include "algorithme.h"
using namespace std;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    bool chaineValide(QString packagesWeight);
    bool donneesValides(int *packsWeight, int binWeight, int nbPackages);
    int* splitToTabInt(QString packsWeight);
    int compteNbPackages(QString packsWeight);
    int choixTri();
    void jefaisrien();

    QString genereHexCouleur();
    QString* colorPacksWeightUI(int nbPackages,int* packsWeight);

    QString packagesWeight;
    QString temp;
    QString* packsColor;
    bool packsColorExit;
    ~MainWindow();

private slots:
    void on_random_clicked();
    void on_go_clicked();
    void on_pushButton_clicked();

    void on_nbPacksRand_valueChanged(int arg1);

    void on_packagesWeight_textChanged();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
